package com.azzcs.ttl.controller;

import com.azzcs.ttl.service.OrderService;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wzg
 * @Date: 2021/4/12 下午5:31
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;


    @GetMapping("/create/{orderId}")
    public String createOrder(@PathVariable("orderId") String orderId){
        return orderService.createOrder(orderId);
    }

    @GetMapping("/payOrder/{orderId}")
    public String payOrder(@PathVariable("orderId") String orderId){
        return orderService.payOrder(orderId);
    }


}
